package com.example.tongue.ui.Online;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.tongue.R;

public class OnlinePhysicianFragment extends Fragment  implements View.OnClickListener {
    private Button findDoctor;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater,
                             @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View onlinePhysicianView=inflater.inflate(R.layout.onlinephysician, container, false);

        findDoctor=onlinePhysicianView.findViewById(R.id.FindDoctor);
        //设置监听器
        findDoctor.setOnClickListener(this);
        return onlinePhysicianView;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.FindDoctor:{
                startActivity(new Intent(getActivity(), Questionnaire.class));
            }
            break;
        }
    }
}
